package com.qk.config;

import com.qk.interceptor.TokenInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * ClassName: WebConfig
 * Package: com.qk.config
 * Description:
 *
 * @Author zt
 * @Create 2025/7/31 18:10
 * @Version 1.0
 */

/*
配置类
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired

    private TokenInterceptor tokenInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry  registry) {

        registry.addInterceptor(tokenInterceptor).addPathPatterns("/**");
    }
}
